<div class="timesheets view">
<h2><?php  __('Timesheet');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $timesheet['Timesheet']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('User'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($timesheet['User']['id'], array('controller' => 'users', 'action' => 'view', $timesheet['User']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Startdate'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $timesheet['Timesheet']['startdate']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Enddate'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $timesheet['Timesheet']['enddate']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Is Committed'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $timesheet['Timesheet']['is_committed']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Is Checked'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $timesheet['Timesheet']['is_checked']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $timesheet['Timesheet']['created']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $timesheet['Timesheet']['modified']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit Timesheet', true), array('action' => 'edit', $timesheet['Timesheet']['id'])); ?> </li>
		<li><?php echo $html->link(__('Delete Timesheet', true), array('action' => 'delete', $timesheet['Timesheet']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $timesheet['Timesheet']['id'])); ?> </li>
		<li><?php echo $html->link(__('List Timesheets', true), array('action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Timesheet', true), array('action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Time Entries', true), array('controller' => 'time_entries', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Time Entry', true), array('controller' => 'time_entries', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Time Entries');?></h3>
	<?php if (!empty($timesheet['TimeEntry'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Timesheet Id'); ?></th>
		<th><?php __('Project Id'); ?></th>
		<th><?php __('Entry Date'); ?></th>
		<th><?php __('Billable Hours'); ?></th>
		<th><?php __('Unbillable Hours'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Modified'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($timesheet['TimeEntry'] as $timeEntry):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $timeEntry['timesheet_id'];?></td>
			<td><?php echo $timeEntry['project_id'];?></td>
			<td><?php echo $timeEntry['entry_date'];?></td>
			<td><?php echo $timeEntry['billable_hours'];?></td>
			<td><?php echo $timeEntry['unbillable_hours'];?></td>
			<td><?php echo $timeEntry['created'];?></td>
			<td><?php echo $timeEntry['modified'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller' => 'time_entries', 'action' => 'view', $timeEntry['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller' => 'time_entries', 'action' => 'edit', $timeEntry['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller' => 'time_entries', 'action' => 'delete', $timeEntry['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $timeEntry['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Time Entry', true), array('controller' => 'time_entries', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
